<template>
	<view>
		<view style="margin-top: 10px;">
		<u-cell-group >
			<u-cell icon="heart" title="用户Id" :value="$store.state.userInfo.userId"></u-cell>
			<u-cell icon="file-text" title="用户名" :value="$store.state.userInfo.username"></u-cell>
			<u-cell icon="account" title="角色" :value="$store.state.userInfo.role"></u-cell>
			<u-cell icon="phone" title="电话" :value="$store.state.userInfo.phone"></u-cell>
		</u-cell-group>
		</view>
		<view style="margin-top: 10px;">
			<u-cell-group >
				<u-cell @click="toSetting" isLink icon="setting" title="修改信息" ></u-cell>
				<u-cell @click="toLogout" isLink icon="eye" title="退出登录" ></u-cell>
			</u-cell-group>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onLoad() {
			this.$store.dispatch('setUserInfoActions');
		},
		methods: {
			toSetting(){
				uni.navigateTo({
					url:'/pages/edituser/edituser'
				})
			},
			toLogout(){
				uni.removeStorageSync("token");
				uni.navigateTo({
					url:'/pages/index/index'
				})
			}
		}
	}
</script>

<style>

</style>
